{include file="public/header" /}
<!--main content start-->
<section class="main-content-wrapper">
    <section id="main-content">
        <div class="row">
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">栏目列表</h3>
            </div>
            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-bordered ">
                        <thead>
                        <tr>
                            <th>#</th>
                            <th>栏目标题</th>
                            <th>文章/产品</th>
                            <th>别名</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {volist name="lists" id="vo"}
                        <tr class="bg_focuse">
                            <td><input class="" type="checkbox" name="checkbox">{$vo.id}</td>
                            <td>{$vo.name}</td>
                            <td>
                                {switch name="$vo.type"}
                                    {case value="1"}文章{/case}
                                    {case value="2"}产品{/case}
                                    {default /}单页
                                {/switch}
                            </td>
                            <td>{$vo.seo_name_en}</td>
                            <td>{$vo.status}</td>
                            <td><button type="button" class="btn btn-xs btn-default" onclick="operation('detail',{$vo.id})">修改</button> &nbsp;<!-- <button type="button" class="btn btn-xs btn-default" data-toggle="modal" data-target="#delete" onclick="operation('delete',{$vo.id})" >删除</button>--></td>
                        </tr>

                        {/volist}
                        </tbody>
                    </table>
                </div>
                {$lists->render()}
            </div>
        </div>
    </div>
</div>
    </section>
</section>
<style>
    .table-striped>tbody>tr:nth-child(odd)>td:hover{
         background-color: #fff;
    }
    .bg_focuse:hover td{background-color: #dff0d8;}
</style>
<script language="javascript" type="text/javascript">
    function operation(type,id){
        if(type=='delete'){
            $('.w_delete').attr('data-id',id);
        }
        if(type=='detail'){
            window.location.href="/admin/column/detail?id="+id;
        }
    }
</script>
<!--main content end-->
{include file="public/footer" /}